Low latency computational capacity provisioning

ABSTRACT

A system for providing low latency computational capacity is provided. The system may be configured to maintain a pool of virtual machine instances, which may be assigned to users to service the requests associated with the users. The system may further be configured to receive a request to acquire compute capacity for executing a program code associated with a particular user, determine whether the pool of virtual machine instances includes a container that may be used to execute the program code therein, and cause the program code of the particular user to be executed in the container.

RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.15/468,724, filed Mar. 24, 2017 and titled “LOW LATENCY COMPUTATIONALCAPACITY PROVISIONING,” which is a continuation of U.S. application Ser.No. 14/502,810, filed Sep. 30, 2014 and titled “LOW LATENCYCOMPUTATIONAL CAPACITY PROVISIONING.” Any and all applications for whicha foreign or domestic priority claim is identified in the ApplicationData Sheet of the present application are hereby incorporated byreference under 37 CFR 1.57 in their entireties.

The present application's Applicant previously filed the following U.S.patent applications on Sep. 30, 2014, the disclosures of which arehereby incorporated by reference in their entireties:

U.S. application Title No. Ser. 14/502,589 MESSAGE-BASED COMPUTATIONREQUEST SCHEDULING 14/502,714 AUTOMATIC MANAGEMENT OF LOW LATENCYCOMPUTATIONAL CAPACITY 14/502,992 THREADING AS A SERVICE 14/502,648PROGRAMMATIC EVENT DETECTION AND MESSAGE GENERATION FOR REQUESTS TOEXECUTE PROGRAM CODE 14/502,741 PROCESSING EVENT MESSAGES FOR USERREQUESTS TO EXECUTE PROGRAM CODE 14/502,620 DYNAMIC CODE DEPLOYMENT ANDVERSIONING

BACKGROUND

Generally described, computing devices utilize a communication network,or a series of communication networks, to exchange data. Companies andorganizations operate computer networks that interconnect a number ofcomputing devices to support operations or provide services to thirdparties. The computing systems can be located in a single geographiclocation or located in multiple, distinct geographic locations (e.g.,interconnected via private or public communication networks).Specifically, data centers or data processing centers, herein generallyreferred to as a “data center,” may include a number of interconnectedcomputing systems to provide computing resources to users of the datacenter. The data centers may be private data centers operated on behalfof an organization or public data centers operated on behalf, or for thebenefit of, the general public.

To facilitate increased utilization of data center resources,virtualization technologies may allow a single physical computing deviceto host one or more instances of virtual machines that appear andoperate as independent computing devices to users of a data center. Withvirtualization, the single physical computing device can create,maintain, delete, or otherwise manage virtual machines in a dynamicmanner. In turn, users can request computer resources from a datacenter, including single computing devices or a configuration ofnetworked computing devices, and be provided with varying numbers ofvirtual machine resources.

In some scenarios, virtual machine instances may be configured accordingto a number of virtual machine instance types to provide specificfunctionality. For example, various computing devices may be associatedwith different combinations of operating systems or operating systemconfigurations, virtualized hardware resources and software applicationsto enable a computing device to provide different desiredfunctionalities, or to provide similar functionalities more efficiently.These virtual machine instance type configurations are often containedwithin a device image, which includes static data containing thesoftware (e.g., the OS and applications together with theirconfiguration and data files, etc.) that the virtual machine will runonce started. The device image is typically stored on the disk used tocreate or initialize the instance. Thus, a computing device may processthe device image in order to implement the desired softwareconfiguration.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing aspects and many of the attendant advantages of thisdisclosure will become more readily appreciated as the same becomebetter understood by reference to the following detailed description,when taken in conjunction with the accompanying drawings, wherein:

FIG. 1 is a block diagram depicting an illustrative environment foracquiring low latency compute capacity;

FIG. 2 depicts a general architecture of a computing device providing avirtual compute system manager for acquiring low latency computecapacity;

FIG. 3 is a flow diagram illustrating a low latency compute capacityacquisition routine implemented by a worker manager, according to anexample aspect;

FIG. 4 is a flow diagram illustrating a low latency compute capacityacquisition routine implemented by a worker manager, according toanother example aspect; and

FIG. 5 illustrates an example table illustrating the various scenariosencountered by a virtual compute system manager.

DETAILED DESCRIPTION

Companies and organizations no longer need to acquire and manage theirown data centers in order to perform computing operations (e.g., executecode, including threads, programs, software, routines, subroutines,processes, etc.). With the advent of cloud computing, storage space andcompute power traditionally provided by hardware computing devices cannow be obtained and configured in minutes over the Internet. Thus,developers can quickly purchase a desired amount of computing resourceswithout having to worry about acquiring physical machines. Suchcomputing resources are typically purchased in the form of virtualcomputing resources, or virtual machine instances. These instances ofvirtual machines, which are hosted on physical computing devices withtheir own operating systems and other software components, can beutilized in the same manner as physical computers.

However, even when virtual computing resources are purchased, developersstill have to decide how many and what type of virtual machine instancesto purchase, and how long to keep them. For example, the costs of usingthe virtual machine instances may vary depending on the type and thenumber of hours they are rented. In addition, the minimum time a virtualmachine may be rented is typically on the order of hours. Further,developers have to specify the hardware and software resources (e.g.,type of operating systems and language runtimes, etc.) to install on thevirtual machines. Other concerns that they might have includeover-utilization (e.g., acquiring too little computing resources andsuffering performance issues), under-utilization (e.g., acquiring morecomputing resources than necessary to run the codes, and thusoverpaying), prediction of change in traffic (e.g., so that they knowwhen to scale up or down), and instance and language runtime startupdelay, which can take 3-10 minutes, or longer, even though users maydesire computing capacity on the order of seconds or even milliseconds.Thus, an improved method of allowing users to take advantage of thevirtual machine instances provided by service providers is desired.

According to aspects of the present disclosure, by maintaining a pool ofpre-initialized virtual machine instances that are ready for use as soonas a user request is received, delay (sometimes referred to as latency)associated with executing the user code (e.g., instance and languageruntime startup time) can be significantly reduced.

Generally described, aspects of the present disclosure relate to themanagement of virtual machine instances and containers created therein.Specifically, systems and methods are disclosed which facilitatemanagement of virtual machine instances in a virtual compute system. Thevirtual compute system maintains a pool of virtual machine instancesthat have one or more software components (e.g., operating systems,language runtimes, libraries, etc.) loaded thereon. The virtual machineinstances in the pool can be designated to service user requests toexecute program codes. The program codes can be executed in isolatedcontainers that are created on the virtual machine instances. Since thevirtual machine instances in the pool have already been booted andloaded with particular operating systems and language runtimes by thetime the requests are received, the delay associated with findingcompute capacity that can handle the requests (e.g., by executing theuser code in one or more containers created on the virtual machineinstances) is significantly reduced.

In another aspect, a virtual compute system may maintain a pool ofvirtual machine instances on one or more physical computing devices,where each virtual machine instance has one or more software componentsloaded thereon. When the virtual compute system receives a request toexecute the program code of a user, which specifies one or morecomputing constraints for executing the program code of the user, thevirtual compute system may select a virtual machine instance forexecuting the program code of the user based on the one or morecomputing constraints specified by the request and cause the programcode of the user to be executed on the selected virtual machineinstance.

Specific embodiments and example applications of the present disclosurewill now be described with reference to the drawings. These embodimentsand example applications are intended to illustrate, and not limit, thepresent disclosure.

With reference to FIG. 1, a block diagram illustrating an embodiment ofa virtual environment 100 will be described. The example shown in FIG. 1includes a virtual environment 100 in which users (e.g., developers,etc.) of user computing devices 102 may run various program codes usingthe virtual computing resources provided by a virtual compute system110.

By way of illustration, various example user computing devices 102 areshown in communication with the virtual compute system 110, including adesktop computer, laptop, and a mobile phone. In general, the usercomputing devices 102 can be any computing device such as a desktop,laptop, mobile phone (or smartphone), tablet, kiosk, wireless device,and other electronic devices. In addition, the user computing devices102 may include web services running on the same or different datacenters, where, for example, different web services may programmaticallycommunicate with each other to perform one or more techniques describedherein. Further, the user computing devices 102 may include Internet ofThings (IoT) devices such as Internet appliances and connected devices.The virtual compute system 110 may provide the user computing devices102 with one or more user interfaces, command-line interfaces (CLI),application programing interfaces (API), and/or other programmaticinterfaces for generating and uploading user codes, invoking the usercodes (e.g., submitting a request to execute the user codes on thevirtual compute system 110), scheduling event-based jobs or timed jobs,tracking the user codes, and/or viewing other logging or monitoringinformation related to their requests and/or user codes. Although one ormore embodiments may be described herein as using a user interface, itshould be appreciated that such embodiments may, additionally oralternatively, use any CLIs, APIs, or other programmatic interfaces.

The user computing devices 102 access the virtual compute system 110over a network 104. The network 104 may be any wired network, wirelessnetwork, or combination thereof. In addition, the network 104 may be apersonal area network, local area network, wide area network,over-the-air broadcast network (e.g., for radio or television), cablenetwork, satellite network, cellular telephone network, or combinationthereof. For example, the network 104 may be a publicly accessiblenetwork of linked networks, possibly operated by various distinctparties, such as the Internet. In some embodiments, the network 104 maybe a private or semi-private network, such as a corporate or universityintranet. The network 104 may include one or more wireless networks,such as a Global System for Mobile Communications (GSM) network, a CodeDivision Multiple Access (CDMA) network, a Long Term Evolution (LTE)network, or any other type of wireless network. The network 104 can useprotocols and components for communicating via the Internet or any ofthe other aforementioned types of networks. For example, the protocolsused by the network 104 may include Hypertext Transfer Protocol (HTTP),HTTP Secure (HTTPS), Message Queue Telemetry Transport (MQTT),Constrained Application Protocol (CoAP), and the like. Protocols andcomponents for communicating via the Internet or any of the otheraforementioned types of communication networks are well known to thoseskilled in the art and, thus, are not described in more detail herein.

The virtual compute system 110 is depicted in FIG. 1 as operating in adistributed computing environment including several computer systemsthat are interconnected using one or more computer networks. The virtualcompute system 110 could also operate within a computing environmenthaving a fewer or greater number of devices than are illustrated inFIG. 1. Thus, the depiction of the virtual compute system 110 in FIG. 1should be taken as illustrative and not limiting to the presentdisclosure. For example, the virtual compute system 110 or variousconstituents thereof could implement various Web services components,hosted or “cloud” computing environments, and/or peer-to-peer networkconfigurations to implement at least a portion of the processesdescribed herein.

Further, the virtual compute system 110 may be implemented in hardwareand/or software and may, for instance, include one or more physical orvirtual servers implemented on physical computer hardware configured toexecute computer executable instructions for performing various featuresthat will be described herein. The one or more servers may begeographically dispersed or geographically co-located, for instance, inone or more data centers.

In the environment illustrated FIG. 1, the virtual environment 100includes a virtual compute system 110, which includes a frontend 120, awarming pool manager 130, and a worker manager 140. In the depictedexample, virtual machine instances (“instances”) 152, 154 are shown in awarming pool 130A managed by the warming pool manager 130, and instances156, 158 are shown in an active pool 140A managed by the worker manager140. The illustration of the various components within the virtualcompute system 110 is logical in nature and one or more of thecomponents can be implemented by a single computing device or multiplecomputing devices. For example, the instances 152, 154, 156, 158 can beimplemented on one or more physical computing devices in differentvarious geographic regions. Similarly, each of the frontend 120, thewarming pool manager 130, and the worker manager 140 can be implementedacross multiple physical computing devices. Alternatively, one or moreof the frontend 120, the warming pool manager 130, and the workermanager 140 can be implemented on a single physical computing device. Insome embodiments, the virtual compute system 110 may comprise multiplefrontends, multiple warming pool managers, and/or multiple workermanagers. Although four virtual machine instances are shown in theexample of FIG. 1, the embodiments described herein are not limited assuch, and one skilled in the art will appreciate that the virtualcompute system 110 may comprise any number of virtual machine instancesimplemented using any number of physical computing devices. Similarly,although a single warming pool and a single active pool are shown in theexample of FIG. 1, the embodiments described herein are not limited assuch, and one skilled in the art will appreciate that the virtualcompute system 110 may comprise any number of warming pools and activepools.

In the example of FIG. 1, the virtual compute system 110 is illustratedas connected to the network 104. In some embodiments, any of thecomponents within the virtual compute system 110 can communicate withother components (e.g., the user computing devices 102 and auxiliaryservices 106, which may include monitoring/logging/billing services 107,storage service 108, an instance provisioning service 109, and/or otherservices that may communicate with the virtual compute system 110) ofthe virtual environment 100 via the network 104. In other embodiments,not all components of the virtual compute system 110 are capable ofcommunicating with other components of the virtual environment 100. Inone example, only the frontend 120 may be connected to the network 104,and other components of the virtual compute system 110 may communicatewith other components of the virtual environment 100 via the frontend120.

Users may use the virtual compute system 110 to execute user codethereon. For example, a user may wish to run a piece of code inconnection with a web or mobile application that the user has developed.One way of running the code would be to acquire virtual machineinstances from service providers who provide infrastructure as aservice, configure the virtual machine instances to suit the user'sneeds, and use the configured virtual machine instances to run the code.Alternatively, the user may send a code execution request to the virtualcompute system 110. The virtual compute system 110 can handle theacquisition and configuration of compute capacity (e.g., containers,instances, etc., which are described in greater detail below) based onthe code execution request, and execute the code using the computecapacity. The virtual compute system 110 may automatically scale up anddown based on the volume, thereby relieving the user from the burden ofhaving to worry about over-utilization (e.g., acquiring too littlecomputing resources and suffering performance issues) orunder-utilization (e.g., acquiring more computing resources thannecessary to run the codes, and thus overpaying).

The frontend 120 processes all the requests to execute user code on thevirtual compute system 110. In one embodiment, the frontend 120 servesas a front door to all the other services provided by the virtualcompute system 110. The frontend 120 processes the requests and makessure that the requests are properly authorized. For example, thefrontend 120 may determine whether the user associated with the requestis authorized to access the user code specified in the request.

The user code as used herein may refer to any program code (e.g., aprogram, routine, subroutine, thread, etc.) written in a specificprogram language. In the present disclosure, the terms “code,” “usercode,” and “program code,” may be used interchangeably. Such user codemay be executed to achieve a specific task, for example, in connectionwith a particular web application or mobile application developed by theuser. For example, the user codes may be written in JavaScript(node.js), Java, Python, and/or Ruby. The request may include the usercode (or the location thereof) and one or more arguments to be used forexecuting the user code. For example, the user may provide the user codealong with the request to execute the user code. In another example, therequest may identify a previously uploaded program code (e.g., using theAPI for uploading the code) by its name or its unique ID. In yet anotherexample, the code may be included in the request as well as uploaded ina separate location (e.g., the storage service 108 or a storage systeminternal to the virtual compute system 110) prior to the request isreceived by the virtual compute system 110. The virtual compute system110 may vary its code execution strategy based on where the code isavailable at the time the request is processed.

The frontend 120 may receive the request to execute such user codes inresponse to Hypertext Transfer Protocol Secure (HTTPS) requests from auser. Also, any information (e.g., headers and parameters) included inthe HTTPS request may also be processed and utilized when executing theuser code. As discussed above, any other protocols, including, forexample, HTTP, MQTT, and CoAP, may be used to transfer the messagecontaining the code execution request to the frontend 120. The frontend120 may also receive the request to execute such user codes when anevent is detected, such as an event that the user has registered totrigger automatic request generation. For example, the user may haveregistered the user code with an auxiliary service 106 and specifiedthat whenever a particular event occurs (e.g., a new file is uploaded),the request to execute the user code is sent to the frontend 120.Alternatively, the user may have registered a timed job (e.g., executethe user code every 24 hours). In such an example, when the scheduledtime arrives for the timed job, the request to execute the user code maybe sent to the frontend 120. In yet another example, the frontend 120may have a queue of incoming code execution requests, and when theuser's batch job is removed from the virtual compute system's workqueue, the frontend 120 may process the user request. In yet anotherexample, the request may originate from another component within thevirtual compute system 110 or other servers or services not illustratedin FIG. 1.

A user request may specify one or more third-party libraries (includingnative libraries) to be used along with the user code. In oneembodiment, the user request is a ZIP file containing the user code andany libraries (and/or identifications of storage locations thereof). Insome embodiments, the user request includes metadata that indicates theprogram code to be executed, the language in which the program code iswritten, the user associated with the request, and/or the computingresources (e.g., memory, etc.) to be reserved for executing the programcode. For example, the program code may be provided with the request,previously uploaded by the user, provided by the virtual compute system110 (e.g., standard routines), and/or provided by third parties. In someembodiments, such resource-level constraints (e.g., how much memory isto be allocated for executing a particular user code) are specified forthe particular user code, and may not vary over each execution of theuser code. In such cases, the virtual compute system 110 may have accessto such resource-level constraints before each individual request isreceived, and the individual requests may not specify suchresource-level constraints. In some embodiments, the user request mayspecify other constraints such as permission data that indicates whatkind of permissions that the request has to execute the user code. Suchpermission data may be used by the virtual compute system 110 to accessprivate resources (e.g., on a private network).

In some embodiments, the user request may specify the behavior thatshould be adopted for handling the user request. In such embodiments,the user request may include an indicator for enabling one or moreexecution modes in which the user code associated with the user requestis to be executed. For example, the request may include a flag or aheader for indicating whether the user code should be executed in adebug mode in which the debugging and/or logging output that may begenerated in connection with the execution of the user code is providedback to the user (e.g., via a console user interface). In such anexample, the virtual compute system 110 may inspect the request and lookfor the flag or the header, and if it is present, the virtual computesystem 110 may modify the behavior (e.g., logging facilities) of thecontainer in which the user code is executed, and cause the output datato be provided back to the user. In some embodiments, the behavior/modeindicators are added to the request by the user interface provided tothe user by the virtual compute system 110. Other features such assource code profiling, remote debugging, etc. may also be enabled ordisabled based on the indication provided in the request.

In some embodiments, the virtual compute system 110 may include multiplefrontends 120. In such embodiments, a load balancer may be provided todistribute the incoming requests to the multiple frontends 120, forexample, in a round-robin fashion. In some embodiments, the manner inwhich the load balancer distributes incoming requests to the multiplefrontends 120 may be based on the state of the warming pool 130A and/orthe active pool 140A. For example, if the capacity in the warming pool130A is deemed to be sufficient, the requests may be distributed to themultiple frontends 120 based on the individual capacities of thefrontends 120 (e.g., based on one or more load balancing restrictions).On the other hand, if the capacity in the warming pool 130A is less thana threshold amount, one or more of such load balancing restrictions maybe removed such that the requests may be distributed to the multiplefrontends 120 in a manner that reduces or minimizes the number ofvirtual machine instances taken from the warming pool 130A. For example,even if, according to a load balancing restriction, a request is to berouted to Frontend A, if Frontend A needs to take an instance out of thewarming pool 130A to service the request but Frontend B can use one ofthe instances in its active pool to service the same request, therequest may be routed to Frontend B.

The warming pool manager 130 ensures that virtual machine instances areready to be used by the worker manager 140 when the virtual computesystem 110 receives a request to execute user code on the virtualcompute system 110. In the example illustrated in FIG. 1, the warmingpool manager 130 manages the warming pool 130A, which is a group(sometimes referred to as a pool) of pre-initialized and pre-configuredvirtual machine instances that may be used to service incoming user codeexecution requests. In some embodiments, the warming pool manager 130causes virtual machine instances to be booted up on one or more physicalcomputing machines within the virtual compute system 110 and added tothe warming pool 130A. In other embodiments, the warming pool manager130 communicates with an auxiliary virtual machine instance service(e.g., the instance provisioning service 109 of FIG. 1) to create andadd new instances to the warming pool 130A. For example, the warmingpool manager 130 may cause additional instances to be added to thewarming pool 130A based on the available capacity in the warming pool130A to service incoming requests. In some embodiments, the warming poolmanager 130 may utilize both physical computing devices within thevirtual compute system 110 and one or more virtual machine instanceservices to acquire and maintain compute capacity that can be used toservice code execution requests received by the frontend 120. In someembodiments, the virtual compute system 110 may comprise one or morelogical knobs or switches for controlling (e.g., increasing ordecreasing) the available capacity in the warming pool 130A. Forexample, a system administrator may use such a knob or switch toincrease the capacity available (e.g., the number of pre-bootedinstances) in the warming pool 130A during peak hours. In someembodiments, virtual machine instances in the warming pool 130A can beconfigured based on a predetermined set of configurations independentfrom a specific user request to execute a user's code. The predeterminedset of configurations can correspond to various types of virtual machineinstances to execute user codes. The warming pool manager 130 canoptimize types and numbers of virtual machine instances in the warmingpool 130A based on one or more metrics related to current or previoususer code executions.

As shown in FIG. 1, instances may have operating systems (OS) and/orlanguage runtimes loaded thereon. For example, the warming pool 130Amanaged by the warming pool manager 130 comprises instances 152, 154.The instance 152 includes an OS 152A and a runtime 152B. The instance154 includes an OS 154A. In some embodiments, the instances in thewarming pool 130A may also include containers (which may further containcopies of operating systems, runtimes, user codes, etc.), which aredescribed in greater detail below. Although the instance 152 is shown inFIG. 1 to include a single runtime, in other embodiments, the instancesdepicted in FIG. 1 may include two or more runtimes, each of which maybe used for running a different user code. In some embodiments, thewarming pool manager 130 may maintain a list of instances in the warmingpool 130A. The list of instances may further specify the configuration(e.g., OS, runtime, container, etc.) of the instances.

In some embodiments, the virtual machine instances in the warming pool130A may be used to serve any user's request. In one embodiment, all thevirtual machine instances in the warming pool 130A are configured in thesame or substantially similar manner. In another embodiment, the virtualmachine instances in the warming pool 130A may be configured differentlyto suit the needs of different users. For example, the virtual machineinstances may have different operating systems, different languageruntimes, and/or different libraries loaded thereon. In yet anotherembodiment, the virtual machine instances in the warming pool 130A maybe configured in the same or substantially similar manner (e.g., withthe same OS, language runtimes, and/or libraries), but some of thoseinstances may have different container configurations. For example, twoinstances may have runtimes for both Python and Ruby, but one instancemay have a container configured to run Python code, and the otherinstance may have a container configured to run Ruby code. In someembodiments, multiple warming pools 130A, each havingidentically-configured virtual machine instances, are provided.

The warming pool manager 130 may pre-configure the virtual machineinstances in the warming pool 130A, such that each virtual machineinstance is configured to satisfy at least one of the operatingconditions that may be requested or specified by the user request toexecute program code on the virtual compute system 110. In oneembodiment, the operating conditions may include program languages inwhich the potential user codes may be written. For example, suchlanguages may include Java, JavaScript, Python, Ruby, and the like. Insome embodiments, the set of languages that the user codes may bewritten in may be limited to a predetermined set (e.g., set of 4languages, although in some embodiments sets of more or less than fourlanguages are provided) in order to facilitate pre-initialization of thevirtual machine instances that can satisfy requests to execute usercodes. For example, when the user is configuring a request via a userinterface provided by the virtual compute system 110, the user interfacemay prompt the user to specify one of the predetermined operatingconditions for executing the user code. In another example, theservice-level agreement (SLA) for utilizing the services provided by thevirtual compute system 110 may specify a set of conditions (e.g.,programming languages, computing resources, etc.) that user requestsshould satisfy, and the virtual compute system 110 may assume that therequests satisfy the set of conditions in handling the requests. Inanother example, operating conditions specified in the request mayinclude: the amount of compute power to be used for processing therequest; the type of the request (e.g., HTTP vs. a triggered event); thetimeout for the request (e.g., threshold time after which the requestmay be terminated); security policies (e.g., may control which instancesin the warming pool 130A are usable by which user); and etc.

The worker manager 140 manages the instances used for servicing incomingcode execution requests. In the example illustrated in FIG. 1, theworker manager 140 manages the active pool 140A, which is a group(sometimes referred to as a pool) of virtual machine instances that arecurrently assigned to one or more users. Although the virtual machineinstances are described here as being assigned to a particular user, insome embodiments, the instances may be assigned to a group of users,such that the instance is tied to the group of users and any member ofthe group can utilize resources on the instance. For example, the usersin the same group may belong to the same security group (e.g., based ontheir security credentials) such that executing one member's code in acontainer on a particular instance after another member's code has beenexecuted in another container on the same instance does not posesecurity risks. Similarly, the worker manager 140 may assign theinstances and the containers according to one or more policies thatdictate which requests can be executed in which containers and whichinstances can be assigned to which users. An example policy may specifythat instances are assigned to collections of users who share the sameaccount (e.g., account for accessing the services provided by thevirtual compute system 110). In some embodiments, the requestsassociated with the same user group may share the same containers (e.g.,if the user codes associated therewith are identical). In someembodiments, a request does not differentiate between the differentusers of the group and simply indicates the group to which the usersassociated with the requests belong.

As shown in FIG. 1, instances may have operating systems (OS), languageruntimes, and containers. The containers may have individual copies ofthe OS and the runtimes and user codes loaded thereon. In the example ofFIG. 1, the active pool 140A managed by the worker manager 140 includesthe instances 156, 158. The instance 156 has an OS 156A, runtimes 156B,156C, and containers 156D, 156E. The container 156D includes a copy ofthe OS 156A, a copy of the runtime 156B, and a copy of a code 156D-1.The container 156E includes a copy of the OS 156A, a copy of the runtime156C, and a copy of a code 156E-1. The instance 158 has an OS 158A,runtimes 158B, 158C, 158E, 158F, a container 158D, and codes 158G, 158H.The container 158D has a copy of the OS 158A, a copy of the runtime158B, and a copy of a code 158D-1. As illustrated in FIG. 1, instancesmay have user codes loaded thereon, and containers within thoseinstances may also have user codes loaded therein. In some embodiments,the worker manager 140 may maintain a list of instances in the activepool 140A. The list of instances may further specify the configuration(e.g., OS, runtime, container, etc.) of the instances. In someembodiments, the worker manager 140 may have access to a list ofinstances in the warming pool 130A (e.g., including the number and typeof instances). In other embodiments, the worker manager 140 requestscompute capacity from the warming pool manager 130 without havingknowledge of the virtual machine instances in the warming pool 130A.

In the example illustrated in FIG. 1, user codes are executed inisolated virtual compute systems referred to as containers (e.g.,containers 156D, 156E, 158D). Containers are logical units createdwithin a virtual machine instance using the resources available on thatinstance. For example, the worker manager 140 may, based on informationspecified in the request to execute user code, create a new container orlocate an existing container in one of the instances in the active pool140A and assigns the container to the request to handle the execution ofthe user code associated with the request. In one embodiment, suchcontainers are implemented as Linux containers. The virtual machineinstances in the active pool 140A may have one or more containerscreated thereon and have one or more program codes associated with theuser loaded thereon (e.g., either in one of the containers or in a localcache of the instance). Each container may have credential informationmade available therein, so that user codes executing on the containerhave access to whatever the corresponding credential information allowsthem to access.

Once a request has been successfully processed by the frontend 120, theworker manager 140 finds capacity to service the request to execute usercode on the virtual compute system 110. For example, if there exists aparticular virtual machine instance in the active pool 140A that has acontainer with the same user code loaded therein (e.g., code 156D-1shown in the container 156D), the worker manager 140 may assign thecontainer to the request and cause the user code to be executed in thecontainer. Alternatively, if the user code is available in the localcache of one of the virtual machine instances (e.g., codes 158G, 158H,which are stored on the instance 158 but do not belong to any individualcontainers), the worker manager 140 may create a new container on suchan instance, assign the container to the request, and cause the usercode to be loaded and executed in the container.

If the worker manager 140 determines that the user code associated withthe request is not found on any of the instances (e.g., either in acontainer or the local cache of an instance) in the active pool 140A,the worker manager 140 may determine whether any of the instances in theactive pool 140A is currently assigned to the user associated with therequest and has compute capacity to handle the current request. If thereis such an instance, the worker manager 140 may create a new containeron the instance and assign the container to the request. Alternatively,the worker manager 140 may further configure an existing container onthe instance assigned to the user, and assign the container to therequest. For example, the worker manager 140 may determine that theexisting container may be used to execute the user code if a particularlibrary demanded by the current user request is loaded thereon. In sucha case, the worker manager 140 may load the particular library and theuser code onto the container and use the container to execute the usercode.

If the active pool 140A does not contain any instances currentlyassigned to the user, the worker manager 140 pulls a new virtual machineinstance from the warming pool 130A, assigns the instance to the userassociated with the request, creates a new container on the instance,assigns the container to the request, and causes the user code to bedownloaded and executed on the container.

In some embodiments, the virtual compute system 110 is adapted to beginexecution of the user code shortly after it is received (e.g., by thefrontend 120). A time period can be determined as the difference in timebetween initiating execution of the user code (e.g., in a container on avirtual machine instance associated with the user) and receiving arequest to execute the user code (e.g., received by a frontend). Thevirtual compute system 110 is adapted to begin execution of the usercode within a time period that is less than a predetermined duration. Inone embodiment, the predetermined duration is 500 ms. In anotherembodiment, the predetermined duration is 300 ms. In another embodiment,the predetermined duration is 100 ms. In another embodiment, thepredetermined duration is 50 ms. In another embodiment, thepredetermined duration is 10 ms. In another embodiment, thepredetermined duration may be any value chosen from the range of 10 msto 500 ms. In some embodiments, the virtual compute system 110 isadapted to begin execution of the user code within a time period that isless than a predetermined duration if one or more conditions aresatisfied. For example, the one or more conditions may include any oneof: (1) the user code is loaded on a container in the active pool 140Aat the time the request is received; (2) the user code is stored in thecode cache of an instance in the active pool 140A at the time therequest is received; (3) the active pool 140A contains an instanceassigned to the user associated with the request at the time the requestis received; or (4) the warming pool 130A has capacity to handle therequest at the time the request is received.

The user code may be downloaded from an auxiliary service 106 such asthe storage service 108 of FIG. 1. Data 108A illustrated in FIG. 1 maycomprise user codes uploaded by one or more users, metadata associatedwith such user codes, or any other data utilized by the virtual computesystem 110 to perform one or more techniques described herein. Althoughonly the storage service 108 is illustrated in the example of FIG. 1,the virtual environment 100 may include other levels of storage systemsfrom which the user code may be downloaded. For example, each instancemay have one or more storage systems either physically (e.g., a localstorage resident on the physical computing system on which the instanceis running) or logically (e.g., a network-attached storage system innetwork communication with the instance and provided within or outsideof the virtual compute system 110) associated with the instance on whichthe container is created. Alternatively, the code may be downloaded froma web-based data store provided by the storage service 108.

Once the worker manager 140 locates one of the virtual machine instancesin the warming pool 130A that can be used to serve the user codeexecution request, the warming pool manager 130 or the worker manger 140takes the instance out of the warming pool 130A and assigns it to theuser associated with the request. The assigned virtual machine instanceis taken out of the warming pool 130A and placed in the active pool140A. In some embodiments, once the virtual machine instance has beenassigned to a particular user, the same virtual machine instance cannotbe used to service requests of any other user. This provides securitybenefits to users by preventing possible co-mingling of user resources.Alternatively, in some embodiments, multiple containers belonging todifferent users (or assigned to requests associated with differentusers) may co-exist on a single virtual machine instance. Such anapproach may improve utilization of the available compute capacity.

In some embodiments, the virtual compute system 110 may maintain aseparate cache in which user codes are stored to serve as anintermediate level of caching system between the local cache of thevirtual machine instances and a web-based network storage (e.g.,accessible via the network 104). The various scenarios that the workermanager 140 may encounter in servicing the request are described ingreater detail below with reference to FIG. 4.

After the user code has been executed, the worker manager 140 may teardown the container used to execute the user code to free up theresources it occupied to be used for other containers in the instance.Alternatively, the worker manager 140 may keep the container running touse it to service additional requests from the same user. For example,if another request associated with the same user code that has alreadybeen loaded in the container, the request can be assigned to the samecontainer, thereby eliminating the delay associated with creating a newcontainer and loading the user code in the container. In someembodiments, the worker manager 140 may tear down the instance in whichthe container used to execute the user code was created. Alternatively,the worker manager 140 may keep the instance running to use it toservice additional requests from the same user. The determination ofwhether to keep the container and/or the instance running after the usercode is done executing may be based on a threshold time, the type of theuser, average request volume of the user, and/or other operatingconditions. For example, after a threshold time has passed (e.g., 5minutes, 30 minutes, 1 hour, 24 hours, 30 days, etc.) without anyactivity (e.g., running of the code), the container and/or the virtualmachine instance is shutdown (e.g., deleted, terminated, etc.), andresources allocated thereto are released. In some embodiments, thethreshold time passed before a container is torn down is shorter thanthe threshold time passed before an instance is torn down.

In some embodiments, the virtual compute system 110 may provide data toone or more of the auxiliary services 106 as it services incoming codeexecution requests. For example, the virtual compute system 110 maycommunicate with the monitoring/logging/billing services 107. Themonitoring/logging/billing services 107 may include: a monitoringservice for managing monitoring information received from the virtualcompute system 110, such as statuses of containers and instances on thevirtual compute system 110; a logging service for managing logginginformation received from the virtual compute system 110, such asactivities performed by containers and instances on the virtual computesystem 110; and a billing service for generating billing informationassociated with executing user code on the virtual compute system 110(e.g., based on the monitoring information and/or the logginginformation managed by the monitoring service and the logging service).In addition to the system-level activities that may be performed by themonitoring/logging/billing services 107 (e.g., on behalf of the virtualcompute system 110) as described above, the monitoring/logging/billingservices 107 may provide application-level services on behalf of theuser code executed on the virtual compute system 110. For example, themonitoring/logging/billing services 107 may monitor and/or log variousinputs, outputs, or other data and parameters on behalf of the user codebeing executed on the virtual compute system 110. Although shown as asingle block, the monitoring, logging, and billing services 107 may beprovided as separate services.

In some embodiments, the worker manager 140 may perform health checks onthe instances and containers managed by the worker manager 140 (e.g.,those in the active pool 140A). For example, the health checks performedby the worker manager 140 may include determining whether the instancesand the containers managed by the worker manager 140 have any issues of(1) misconfigured networking and/or startup configuration, (2) exhaustedmemory, (3) corrupted file system, (4) incompatible kernel, and/or anyother problems that may impair the performance of the instances and thecontainers. In one embodiment, the worker manager 140 performs thehealth checks periodically (e.g., every 5 minutes, every 30 minutes,every hour, every 24 hours, etc.). In some embodiments, the frequency ofthe health checks may be adjusted automatically based on the result ofthe health checks. In other embodiments, the frequency of the healthchecks may be adjusted based on user requests. In some embodiments, theworker manager 140 may perform similar health checks on the instancesand/or containers in the warming pool 130A. The instances and/or thecontainers in the warming pool 130A may be managed either together withthose instances and containers in the active pool 140A or separately. Insome embodiments, in the case where the health of the instances and/orthe containers in the warming pool 130A is managed separately from theactive pool 140A, the warming pool manager 130, instead of the workermanager 140, may perform the health checks described above on theinstances and/or the containers in the warming pool 130A.

The worker manager 140 may include an instance allocation unit forfinding compute capacity (e.g., containers) to service incoming codeexecution requests and a user code execution unit for facilitating theexecution of user codes on those containers. An example configuration ofthe worker manager 140 is described in greater detail below withreference to FIG. 2.

FIG. 2 depicts a general architecture of a computing system (referencedas worker manager 140) that manages the virtual machine instances in thevirtual compute system 110. The general architecture of the workermanager 140 depicted in FIG. 2 includes an arrangement of computerhardware and software modules that may be used to implement aspects ofthe present disclosure. The hardware modules may be implemented withphysical electronic devices, as discussed in greater detail below. Theworker manager 140 may include many more (or fewer) elements than thoseshown in FIG. 2. It is not necessary, however, that all of thesegenerally conventional elements be shown in order to provide an enablingdisclosure. Additionally, the general architecture illustrated in FIG. 2may be used to implement one or more of the other components illustratedin FIG. 1. As illustrated, the worker manager 140 includes a processingunit 190, a network interface 192, a computer readable medium drive 194,an input/output device interface 196, all of which may communicate withone another by way of a communication bus. The network interface 192 mayprovide connectivity to one or more networks or computing systems. Theprocessing unit 190 may thus receive information and instructions fromother computing systems or services via the network 104. The processingunit 190 may also communicate to and from memory 180 and further provideoutput information for an optional display (not shown) via theinput/output device interface 196. The input/output device interface 196may also accept input from an optional input device (not shown).

The memory 180 may contain computer program instructions (grouped asmodules in some embodiments) that the processing unit 190 executes inorder to implement one or more aspects of the present disclosure. Thememory 180 generally includes RAM, ROM and/or other persistent,auxiliary or non-transitory computer-readable media. The memory 180 maystore an operating system 184 that provides computer programinstructions for use by the processing unit 190 in the generaladministration and operation of the worker manager 140. The memory 180may further include computer program instructions and other informationfor implementing aspects of the present disclosure. For example, in oneembodiment, the memory 180 includes a user interface unit 182 thatgenerates user interfaces (and/or instructions therefor) for displayupon a computing device, e.g., via a navigation and/or browsinginterface such as a browser or application installed on the computingdevice. In addition, the memory 180 may include and/or communicate withone or more data repositories (not shown), for example, to access userprogram codes and/or libraries.

In addition to and/or in combination with the user interface unit 182,the memory 180 may include an instance allocation unit 186 and a usercode execution unit 188 that may be executed by the processing unit 190.In one embodiment, the user interface unit 182, instance allocation unit186, and user code execution unit 188 individually or collectivelyimplement various aspects of the present disclosure, e.g., findingcompute capacity (e.g., a container) to be used for executing user code,causing the user code to be loaded and executed on the container, etc.as described further below.

The instance allocation unit 186 finds the compute capacity to be usedfor servicing a request to execute user code. For example, the instanceallocation unit 186 identifies a virtual machine instance and/or acontainer that satisfies any constraints specified by the request andassigns the identified virtual machine instance and/or container to theuser or the request itself. The instance allocation unit 186 may performsuch identification based on the programming language in which the usercode is written. For example, if the user code is written in Python, andthe instance allocation unit 186 may find an virtual machine instance(e.g., in the warming pool 130A of FIG. 1) having the Python runtimepre-loaded thereon and assign the virtual machine instance to the user.In another example, if the program code specified in the request of theuser is already loaded on an existing container or on another virtualmachine instance assigned to the user (e.g., in the active pool 140A ofFIG. 1), the instance allocation unit 186 may cause the request to beprocessed in the container or in a new container on the virtual machineinstance. In some embodiments, if the virtual machine instance hasmultiple language runtimes loaded thereon, the instance allocation unit186 may create a new container on the virtual machine instance and loadthe appropriate language runtime on the container based on the computingconstraints specified in the request.

The user code execution unit 188 manages the execution of the programcode specified by the request of the user once a particular virtualmachine instance has been assigned to the user associated with therequest and a container on the particular virtual machine instance hasbeen assigned to the request. If the code is pre-loaded in a containeron the virtual machine instance assigned to the user, the code is simplyexecuted in the container. If the code is available via a networkstorage (e.g., storage service 108 of FIG. 1), the user code executionunit 188 downloads the code into a container on the virtual machineinstance and causes the code to be executed (e.g., by communicating withthe frontend 120 of FIG. 1) once it has been downloaded.

While the instance allocation unit 186 and the user code execution unit188 are shown in FIG. 2 as part of the worker manager 140, in otherembodiments, all or a portion of the instance allocation unit 186 andthe user code execution unit 188 may be implemented by other componentsof the virtual compute system 110 and/or another computing device. Forexample, in certain embodiments of the present disclosure, anothercomputing device in communication with the virtual compute system 110may include several modules or components that operate similarly to themodules and components illustrated as part of the worker manager 140.

In some embodiments, the worker manager 140 may further includecomponents other than those illustrated in FIG. 2. For example, thememory 180 may further include a container manager for managingcreation, preparation, and configuration of containers within virtualmachine instances.

Turning now to FIG. 3, a routine 300 implemented by one or morecomponents of the virtual compute system 110 (e.g., the worker manager140) will be described. Although routine 300 is described with regard toimplementation by the worker manager 140, one skilled in the relevantart will appreciate that alternative components may implement routine300 or that one or more of the blocks may be implemented by a differentcomponent or in a distributed manner.

At block 302 of the illustrative routine 300, the worker manager 140receives a request to execute user code. Alternatively, the workermanager 140 receives a request from the frontend 120 of FIG. 1 to findcompute capacity for executing the user code associated with an incomingrequest received and processed by the frontend 120. For example, thefrontend 120 may process the request received from the user computingdevices 102 or the auxiliary services 106, and forward the request tothe worker manager 140 after authenticating the user and determiningthat the user is authorized to access the specified user code. Asdiscussed above, the request may include data or metadata that indicatesthe program code to be executed, the language in which the program codeis written, the user associated with the request, and/or the computingresources (e.g., memory, etc.) to be reserved for executing the programcode. For example, the request may specify that the user code is to beexecuted on “Operating System A” using “Language Runtime X.” In such anexample, the worker manager 140 may locate a virtual machine instancethat has been pre-configured with “Operating System A” and “LanguageRuntime X” and assigned it to the user. The worker manager 140 may thencreate a container on the virtual machine instance for executing theuser code therein.

Next, at block 304, the worker manager 140 acquires compute capacitybased on the information indicated in the request. In some embodiments,the compute capacity comprises a container that is configured to servicethe code execution request. As discussed herein, the container may beacquired from the active pool 140A or the warming pool 130A. How thecompute capacity is acquired is described in greater detail below withreference to FIG. 4.

At block 306, the worker manager 140 causes the user code to be executedusing the compute capacity. For example, the worker manager 140 may sendthe address of the container assigned to the request to the frontend 120so that the frontend 120 can proxy the code execution request to theaddress. In some embodiments, the address may be temporarily reserved bythe worker manager 140 and the address and/or the container mayautomatically be released after a specified time period elapses. In someembodiments, the address and/or the container may automatically bereleased after the user code has finished executing in the container.

While the routine 300 of FIG. 3 has been described above with referenceto blocks 302-306, the embodiments described herein are not limited assuch, and one or more blocks may be omitted, modified, or switchedwithout departing from the spirit of the present disclosure. Forexample, the block 302 may be modified such that the worker manager 140receives a compute capacity acquisition request from the frontend 120.

Turning now to FIG. 4, a routine 400 implemented by one or morecomponents of the virtual compute system 110 (e.g., the worker manager140) will be described. Although routine 400 is described with regard toimplementation by the worker manager 140, one skilled in the relevantart will appreciate that alternative components may implement routine400 or that one or more of the blocks may be implemented by a differentcomponent or in a distributed manner.

At block 402 of the illustrative routine 400, the worker manager 140receives a request to execute user code. For example, the block 402 maybe similar to the block 302 of FIG. 3.

Next, at block 404, the worker manager 140 determines whether thereexists a container in the virtual compute system 110 that already hasthe user code associated with request loaded therein. In one embodiment,the worker manager 140 first determines whether the active pool 140A hasany instances assigned to the user associated with the request, and lookin any of those instances whether there is a container with the usercode loaded therein. In another embodiment, the worker manager 140checks a list that includes all the instances in the active pool 140Aand searches the list for a code ID associated with or assigned to theuser code. The code ID may be automatically generated based on therequest or a portion thereof (e.g., based on the code location or theactual code). If the worker manager 140 determines that there is acontainer with the user code loaded therein, the routine 400 proceeds toblock 406, where the worker manager 140 processes the request using theidentified container. On the other hand, if the worker manager 140determines that there is no container with the user coded loadedtherein, the routine 400 proceeds to block 408.

The illustrative routine 400 describes temporal sharing of thecontainers, where the worker manager 140 may maintain a particularcontainer after completing a previous request to execute a program codeon that particular container and send a subsequent request associatedwith the same program code back to the same container. In anotherembodiment, the worker manager 140 may acquire and provide low latencycompute capacity by utilizing spatial sharing. With spatial sharing,multiple temporally-overlapping requests are sent to the same container,e.g., forcing the container to use multiple threads to handle themultiple requests. For example, the worker manager 140 may find that acontainer is busy running a particular program code and further engagethe same container to do more of the same work (e.g., execute theparticular program code).

Retuning to FIG. 4, at block 408, the worker manager 140 determineswhether there exists an instance in the virtual compute system 110 thathas the user code stored thereon. For example, one of the instances mayhave previously executed the user code in a container created thereon,and the container may since have been terminated, but the user code maystill remain on the instance (e.g., in an instance code cache). If theworker manager 140 determines that there is such an instance, theroutine 400 proceeds to block 410, where the worker manager 140 createsa new container on the instance, and block 412, wherein the workermanager 140 causes the request to be processed using the container.Before the new container is created, the worker manager 140 maydetermine whether the instance has resources sufficient to handle therequest. On the other hand, if the worker manager 140 determines thatthere is no such instance, the routine 400 proceeds to block 414.

At block 414, the worker manager 140 determines whether there exists aninstance in the virtual compute system 110 that is currently assigned tothe user associated with the request. In some embodiments, such adetermination may have already been made (e.g., at block 404 and/orblock 408). If the worker manager 140 determines that there is such aninstance, the routine 400 proceeds to block 416, where the workermanager 140 creates a new container on the instance, and block 418,wherein the worker manager 140 causes the request to be processed usingthe container. Before the new container is created, the worker manager140 may determine whether the instance has resources sufficient tohandle the request. On the other hand, if the worker manager 140determines that there is no such instance, the routine 400 proceeds toblock 420.

At block 420, the worker manager 140 obtains a new instance from thewarming pool 130A or from the warming pool manager 130. At block 422,the worker manager 140 creates a new container on the obtained instance.At block 424, the worker manager 140 processes the request using thecontainer. For example, the worker manager 140 assigns the container tothe request, and sends the address of the container to the frontend 120.

While the routine 400 of FIG. 4 has been described above with referenceto blocks 402-410, the embodiments described herein are not limited assuch, and one or more blocks may be omitted, modified, or switchedwithout departing from the spirit of the present disclosure. Forexample, the block 402 may be modified such that the worker manager 140receives a compute capacity acquisition request from the frontend 120.In another embodiment, the worker manager 140 may first determinewhether there exists an instance assigned to the user, and if itdetermines that there is no such instance, the routine 400 may proceeddirectly to block 420. In another embodiment, instead of creating a newcontainer at blocks 410 and 416, the worker manager 140 may configure anexisting container on the instance assigned to the user and use thecontainer to process the request.

Turning now to FIG. 5, a table 500 that illustrates various possiblescenarios encountered by the worker manager 140 and how latencyperformance may be affected by instance and user code locations will bedescribed. The table 500 shows the various locations that the user codeassociated with a request and the instance for servicing the request maybe found after the request is received. In the example of FIG. 5, theuser code may be found in a container (e.g., on a currently-running orrecently used instance in the active pool 140A assigned to the userassociated with the request), an instance (e.g., an instance in theactive pool 140A, but not on a container within such instance), or anexternal service (e.g., code storage service such as the storage system108), in the order of increasing latency (associated with executing theuser code). Similarly, the instance for servicing the request may befound in an active pool (e.g., the active pool 140A), a warming pool(e.g., the warming pool 130A), or in neither, in which case a newinstance would be created to handle the incoming request), in the orderof increasing latency (associated with executing the user code).Depending on the implementation of the virtual compute system 110, oneor more of the scenarios illustrated in FIG. 5 may not be feasible orpossible. For example, in some implementations, if the user code isfound in one of the containers, the instance for servicing the requestis simply the instance in which the container is created, rendering thewarming pool and the external service scenarios moot.

The locations referred to herein may be logical in nature, and may ormay not correspond to physically distinct locations. Additionally, thelocations illustrated in FIG. 5 are mere examples, and the embodimentsdescribed herein may involve fewer or more locations of user codesand/or instances.

Example Clauses

Clause 1: A system, comprising: one or more hardware computing devicesconfigured to execute computer-executable instructions to at least:receive a request to execute a first program code, the requestindicative of (i) one or more arguments to be used for the execution ofthe first program code and (ii) a first amount of computing resources tobe allocated for the execution of the first program code; determine thata first virtual machine instance of a plurality of virtual machineinstances includes the first program code and includes at least thefirst amount of computing resources; and cause the first program code tobe executed, using the one or more arguments, in a container created onthe first virtual machine instance and having at least the first amountof computing resources.

Clause 2: The system of Clause 1, wherein the request does not specifythe first amount of computing resources, and the one or more hardwarecomputing devices are further configured to determine the first amountof computing resources to be allocated for the execution of the firstprogram code by accessing a resource constraint associated with thefirst program code.

Clause 3: The system of Clause 1, wherein the container on the firstvirtual machine instance includes the first program code at a time thatthe request is received.

Clause 4: The system of Clause 1, wherein the first virtual machineinstance includes the first program code at a time that the request isreceived.

Clause 5: The system of Clause 1, further comprising a code cacheconfigured to store program codes, wherein the one or more hardwarecomputing devices are configured to store the first program code in thecode cache.

Clause 6: The system of Clause 1, wherein the one or more hardwarecomputing devices are further configured to determine, based on arequest volume associated with the first program code, that thecontainer is to be kept alive even after the execution of the firstprogram code has been completed.

Clause 7: The system of Clause 1, wherein the one or more hardwarecomputing devices are further configured to search for an identifier(ID) value associated with the first program code in a plurality ofvirtual machine instances.

Clause 8: A computer-implemented method, as implemented by one or morecomputing devices configured with specific executable instructions,comprising: receiving a request to execute a first program code, therequest indicative of (i) one or more arguments to be used for theexecution of the first program code and (ii) a first amount of computingresources to be allocated for the execution of the first program code;determining that a first virtual machine instance of a plurality ofvirtual machine instances includes the first program code and includesat least the first amount of computing resources; and executing thefirst program code, using the one or more arguments, in a containercreated on the first virtual machine instance and having at least thefirst amount of computing resources.

Clause 9: The computer-implemented method of Clause 8, wherein therequest does not specify the first amount of computing resources, thecomputer-implemented method further comprising determining the firstamount of computing resources to be allocated for the execution of thefirst program code by accessing a resource constraint associated withthe first program code.

Clause 10: The computer-implemented method of Clause 8, wherein thecontainer on the first virtual machine instance includes the firstprogram code at a time that the request is received.

Clause 11: The computer-implemented method of Clause 8, wherein thefirst virtual machine instance includes the first program code at a timethat the request is received.

Clause 12: The computer-implemented method of Clause 8, furthercomprising storing the first program code in a code cache configured tostore program codes.

Clause 13: The computer-implemented method of Clause 8, furthercomprising determining, based on a request volume associated with thefirst program code, that the container is to be kept alive even afterthe execution of the first program code has been completed.

Clause 14: The computer-implemented method of Clause 8, furthercomprising searching for an identifier (ID) value associated with thefirst program code in a plurality of virtual machine instances.

Clause 15: Non-transitory physical computer storage storingcomputer-executable instructions that, when executed by one or morecomputing devices, configure the one or more computing devices to:receive a request to execute a first program code, the requestindicative of (i) one or more arguments to be used for the execution ofthe first program code and (ii) a first amount of computing resources tobe allocated for the execution of the first program code; determine thata first virtual machine instance of a plurality of virtual machineinstances includes the first program code and includes at least thefirst amount of computing resources; and cause the first program code tobe executed, using the one or more arguments, in a container created onthe first virtual machine instance and having at least the first amountof computing resources.

Clause 16: The non-transitory physical computer storage of Clause 15,wherein the request does not specify the first amount of computingresources, and the computer-executable instructions further cause theone or more hardware computing devices to determine the first amount ofcomputing resources to be allocated for the execution of the firstprogram code by accessing a resource constraint associated with thefirst program code.

Clause 17: The non-transitory physical computer storage of Clause 15,wherein at least one of the first virtual machine instance or thecontainer on the first virtual machine instance includes the firstprogram code at a time that the request is received.

Clause 18: The non-transitory physical computer storage of Clause 15,wherein the computer-executable instructions further cause the one ormore hardware computing devices to store the first program code in acode cache configured to store program codes.

Clause 19: The non-transitory physical computer storage of Clause 15,wherein the computer-executable instructions further cause the one ormore hardware computing devices to determine, based on a request volumeassociated with the first program code, that the container is to be keptalive even after the execution of the first program code has beencompleted.

Clause 20: The non-transitory physical computer storage of Clause 15,wherein the computer-executable instructions further cause the one ormore hardware computing devices to search for an identifier (ID) valueassociated with the first program code in a plurality of virtual machineinstances.

Other Considerations

It will be appreciated by those skilled in the art and others that allof the functions described in this disclosure may be embodied insoftware executed by one or more physical processors of the disclosedcomponents and mobile communication devices. The software may bepersistently stored in any type of non-volatile storage.

Conditional language, such as, among others, “can,” “could,” “might,” or“may,” unless specifically stated otherwise, or otherwise understoodwithin the context as used, is generally intended to convey that certainembodiments include, while other embodiments do not include, certainfeatures, elements and/or steps. Thus, such conditional language is notgenerally intended to imply that features, elements and/or steps are inany way required for one or more embodiments or that one or moreembodiments necessarily include logic for deciding, with or without userinput or prompting, whether these features, elements and/or steps areincluded or are to be performed in any particular embodiment.

Any process descriptions, elements, or blocks in the flow diagramsdescribed herein and/or depicted in the attached figures should beunderstood as potentially representing modules, segments, or portions ofcode which include one or more executable instructions for implementingspecific logical functions or steps in the process. Alternateimplementations are included within the scope of the embodimentsdescribed herein in which elements or functions may be deleted, executedout of order from that shown or discussed, including substantiallyconcurrently or in reverse order, depending on the functionalityinvolved, as would be understood by those skilled in the art. It willfurther be appreciated that the data and/or components described abovemay be stored on a computer-readable medium and loaded into memory ofthe computing device using a drive mechanism associated with a computerreadable storage medium storing the computer executable components suchas a CD-ROM, DVD-ROM, or network interface. Further, the componentand/or data can be included in a single device or distributed in anymanner. Accordingly, general purpose computing devices may be configuredto implement the processes, algorithms, and methodology of the presentdisclosure with the processing and/or execution of the various dataand/or components described above.

It should be emphasized that many variations and modifications may bemade to the above-described embodiments, the elements of which are to beunderstood as being among other acceptable examples. All suchmodifications and variations are intended to be included herein withinthe scope of this disclosure and protected by the following claims.

What is claimed is:
 1. A computer-implemented method, as implemented byone or more computing devices configured with specific executableinstructions, comprising: receiving, by a virtual compute systemconfigured to execute user-identified program codes, a code executionrequest to execute a program code associated with a user using computecapacity acquired in response to the code execution request, wherein thecode execution request is automatically generated, based on the programcode having been registered with a storage system in communication withthe virtual compute system, in response to a file being uploaded ontothe storage system with which the program code has been registered, thecode execution request associated with one or more arguments to be usedto execute the program code associated with the user; selecting one ormore virtual machine instances from a plurality of virtual machineinstances capable of executing the program code associated with theuser, or instantiating one or more virtual machine instances capable ofexecuting the program code associated with the user; and executing theprogram code associated with the user, based at least in part on the oneor more arguments associated with the code execution request, on the oneor more virtual machine instances.
 2. The computer-implemented method ofclaim 1, wherein the code execution request includes a copy of theprogram code or an identifier associated with the program code.
 3. Thecomputer-implemented method of claim 1, wherein the code executionrequest includes the one or more arguments to be used to execute theprogram code.
 4. The computer-implemented method of claim 1, wherein theone or more arguments comprise data associated with the file uploadedonto the storage system with which the program code has been registeredto trigger execution of the program code.
 5. The computer-implementedmethod of claim 1, further comprising receiving, by the virtual computesystem configured to execute user-identified program codes, a secondcode execution request to execute a second program code different fromthe program code, wherein the second code execution request isautomatically generated, based on execution of the second program codebeing configured to be triggered based on time, in response to a timecondition being satisfied, wherein the second code execution requestincludes data associated with a scheduled execution of the secondprogram code configured to be triggered when the time condition issatisfied.
 6. The computer-implemented method of claim 1, wherein atleast one of the one or more selected virtual machine instances isstoring a copy of the program code at a time that the file is uploadedonto the storage system in communication with the virtual computesystem.
 7. The computer-implemented method of claim 1, furthercomprising loading a copy of the program code onto at least one of theone or more instantiated virtual machine instances.
 8. Thecomputer-implemented method of claim 1, further comprising, based on arequest volume associated with the program code, keeping the one or morevirtual machine instances alive even after the execution of the programcode has been completed.
 9. A system, comprising: one or moreprocessors; and one or more memories having stored thereon instructions,which, when executed by the one or more processors, cause the one ormore processors to: receive a code execution request to execute aprogram code associated with a user using compute capacity acquired inresponse to the code execution request, wherein the code executionrequest is automatically generated, based on the program code havingbeen registered with a storage system in communication with the system,in response to a file being uploaded onto the storage system with whichthe program code has been registered, the request associated with one ormore arguments to be used to execute the program code associated withthe user; select one or more virtual machine instances from a pluralityof virtual machine instances capable of executing the program codeassociated with the user, or cause one or more virtual machine instancescapable of executing the program code associated with the user to beinstantiated; and cause the program code associated with the user to beexecuted, based at least in part on the one or more arguments associatedwith the code execution request, on the one or more virtual machineinstances.
 10. The system of claim 9, wherein the code execution requestincludes a copy of the program code or an identifier associated with theprogram code.
 11. The system of claim 9, wherein the code executionrequest includes the one or more arguments to be used to execute theprogram code.
 12. The system of claim 9, wherein the one or morearguments comprise data associated with the file uploaded onto thestorage system with which the program code has been registered totrigger execution of the program code.
 13. The system of claim 9,wherein the instructions further cause the one or more processors toreceive a second code execution request to execute a second program codedifferent from the program code, wherein the second code executionrequest is automatically generated, based on execution of the secondprogram code being configured to be triggered based on time, in responseto a time condition being satisfied, wherein the second code executionrequest includes data associated with a scheduled execution of thesecond program code configured to be triggered when the time conditionis.
 14. The system of claim 9, wherein at least one of the one or moreselected virtual machine instances is storing a copy of the program codeat a time that the file is uploaded onto the storage system incommunication with the system.
 15. The system of claim 9, wherein theinstructions further cause the one or more processors to cause a copy ofthe program code to be loaded onto at least one of the one or moreinstantiated virtual machine instances.
 16. The system of claim 9,wherein the instructions further cause the one or more processors to,based on a request volume associated with the program code, cause theone or more virtual machine instances to be kept alive even after theexecution of the program code has been completed.
 17. Non-transitoryphysical computer storage storing specific executable instructions that,when executed by one or more computing devices, configure the one ormore computing devices to: receive a code execution request to execute aprogram code associated with a user using compute capacity acquired inresponse to the code execution request, wherein the code executionrequest is automatically generated, based on the program code havingbeen registered with a storage system, in response to a file beinguploaded onto the storage system with which the program code has beenregistered, the code execution request associated with one or morearguments to be used to execute the program code associated with theuser; select one or more virtual machine instances from a plurality ofvirtual machine instances capable of executing the program codeassociated with the user, or cause one or more virtual machine instancescapable of executing the program code associated with the user to beinstantiated; and cause the program code associated with the user to beexecuted, based at least in part on the one or more arguments associatedwith the code execution request, on the one or more virtual machineinstances.
 18. The non-transitory physical computer storage of claim 17,wherein the code execution request includes one or more of a copy of theprogram code, an identifier associated with the program code, the one ormore arguments to be used to execute the program code, or dataassociated with the file uploaded onto the storage system with which theprogram code has been registered to trigger execution of the programcode.
 19. The non-transitory physical computer storage of claim 17,wherein at least one of the one or more selected virtual machineinstances is storing a copy of the program code at a time that the fileis uploaded onto the storage system in communication with the system.20. The non-transitory physical computer storage of claim 17, whereinthe instructions further cause the one or more processors to cause acopy of the program code to be loaded onto at least one of the one ormore instantiated virtual machine instances.